package c.x.jy.threadquery;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 

public class OrderServiceImpl {

	public Map<String,Object> querybyID(String code) {
    
		return new HashMap<String,Object>(){ 
			private static final long serialVersionUID = 1L;
			{put("code", code);put("result", "result"+code);}};
	}
	

	public List<Map<String,Object>> querybyIDList(List<String> codes) {
		List<Map<String, Object>>list=new ArrayList<>();
    for (String code : codes) {
		list.add( new HashMap<String,Object>(){ 
			private static final long serialVersionUID = 1L;
			{put("code", code);put("result", "result"+code);}});
	}
		return list;
	}


	public List<Map<String, Object>> querylist(List<Map<String, String>> params) {
		List list=new ArrayList();
	    for (Map<String, String> map : params) {
	    	Map<String,Object> m=	querybyID(map.get("orderCode"));
	    	String seriaNo = map.get("serialNo").toString();
	    	m.put("serialNo", map.get("serialNo"));
			list.add(m );
		}
	    System.out.println("res:"+list.size());
		return list;
	}

}
